#ifndef SETTINGITEM_H
#define SETTINGITEM_H

#include <QString>
#include <QColor>
#include <QSettings>
#include <QFont>

enum SettingsTypeEnum
{
    ESettingString = 0,
    ESettingInt,
    ESettingColor,
    ESettingFont,
    ESettingBool
};

class SettingItem
{
    QString m_key;
    QColor m_colorValue;
    QFont m_fontValue;
    int m_intValue;
    QString m_stringValue;
    SettingsTypeEnum m_type;
    bool m_boolValue;
public:
    SettingItem(QString aKey);
    SettingItem();
    QString getKey() const;
    QColor getColorValue() const;
    int getIntValue() const;
    QString getStringValue() const;
    bool getBoolValue() const;
    QFont getFontValue() const;
    SettingsTypeEnum getType() const;
    void setColorValue(QColor aColor);
    void setIntValue(int aValue);
    void setStringValue(QString aValue);
    void setBoolValue(bool aValue);
    void setType(SettingsTypeEnum aType);
    void setFontValue(QFont aFont);
    SettingItem &operator =(const SettingItem &aItem);
    SettingItem &operator =(SettingItem &aItem);
    void write(QSettings & aSettings);
    void read(QSettings & aSettings);
    SettingItem(QString aKey, QString aValue);
    SettingItem(QString aKey, int aValue);
    SettingItem(QString aKey, QColor aValue);
    SettingItem(QString aKey, QFont aValue);
    SettingItem(QString aKey, bool aValue);
    QString getEditorContent();
    QString getHtmlStyle();
    void processLink();
};

#endif // SETTINGITEM_H
